package com.xmtlxx.tms.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.tms.domain.Lines;
import com.xmtlxx.tms.domain.bo.LinesBo;
import com.xmtlxx.tms.domain.vo.LinesVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 线路Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface LinesMapper extends BaseMapperPlus<LinesMapper, Lines, LinesVo> {
    /**
     * 根据条件分页查询线路
     *
     * @param lines 线路
     * @return Page Lines
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "l.create_by"),
        @DataColumn(key = "deptName", value = "l.dept_id"),
        @DataColumn(key = "userName", value = "l.create_by")
    })
    Page<LinesVo> selectPageLinesList(@Param("page") Page<Lines> page,@Param("lines") LinesBo lines);

    /**
     * 查询线路列表
     *
     * @param lines 线路
     * @return 线路集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "l.create_by"),
        @DataColumn(key = "deptName", value = "l.dept_id"),
        @DataColumn(key = "userName", value = "l.create_by")
    })
    List<LinesVo> selectLinesList(@Param("lines") LinesBo lines);

    LinesVo selectLinesVoByID(String id);

    List<LinesVo> selectLinesByClientId(@Param("lines") LinesBo lines);
}
